package com.tian.view.draw.text

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment

/**
 * @author tiansongtao
 * @date 2022/12/30 17:22
 * Canvas文本绘制
 */
class DrawTextFragment: Fragment() {
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        (requireActivity() as AppCompatActivity).supportActionBar?.title = "Canvas文本绘制"
        val drawView = DrawTextView(requireContext())
        val lp = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
        drawView.layoutParams = lp
        return drawView
    }
}